<!-- Imported scripts on this page -->
<script src="/public/js/timepicker/bootstrap-timepicker.min.js"></script>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">教练姓名</label>

    <div class="col-sm-10">
        <input type="text" name="coach.coachName" class="form-control" placeholder="请输入教练姓名"
               data-validate="required" value="${coach?.coachName}">
    </div>
</div>

<div class="form-group-separator"></div>


<div class="form-group">
    <label class="col-sm-2 control-label">性别</label>

    <div class="col-sm-10">
        <label class="radio-inline">
            <input type="radio"  name="coach.genderType" ${coach?.genderType?.toString() == 'MALE' ? 'checked' : ''} value="MALE">
            男
        </label>
        <label class="radio-inline">
            <input type="radio"  name="coach.genderType" ${coach?.genderType?.toString() == 'FEMALE' ? 'checked' : ''} value="FEMALE">
            女
        </label>
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-3">教练图片</label>

    <div class="col-sm-10">
        <p style="color: red">注:只能上传4:3分辨率的图片</p>
        <input type="file" class="form-control" name="coachImage" id="coachImage" data-validate="${coach?.coachImage == null || coach?.coachImage == '' ? 'required' : ''}">
    </div>
</div>

#{if coach?.coachImage != null && coach?.coachImage != ''}
<div class="form-group">
    <label class="col-sm-2 control-label" for="field-3"></label>

    <div class="col-sm-10">
        <img src="${coach?.coachImage}" style="width: 100px">
    </div>
</div>
#{/if}

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label">健身类型</label>

    <div class="col-sm-10">
        <select class="form-control" name="coach.fitnesses.id" data-validate="required">
            <option value="">请选择健身类型</option>
        #{list fitnesses,as:'fitness'}
            <option ${fitness?.id==coach?.fitnesses?.id?'selected' : ''} value="${fitness?.id}">${fitness?.name}</option>
        #{/list}
        </select>
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">上午上课时间</label>

    <div class="col-sm-10">
        <input type="text" name="coach.classTimeAM" class="form-control timepicker" placeholder="请输入开始时间"
               data-validate="required" data-show-meridian="false"  data-template="dropdown" data-default-time="${coach?.classTimeAM}"
                data-minute-step="5">
    </div>
</div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">上午课程数量</label>

    <div class="col-sm-10">
        <input type="text" name="coach.classNumberAM" class="form-control" placeholder="请输入下午课程数量"
               data-validate="required" value="${coach?.classNumberAM}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">下午上课时间</label>

    <div class="col-sm-10">
        <input type="text" name="coach.classTimePM" class="form-control timepicker" placeholder="请输入结束时间"
               data-validate="required" data-show-meridian="false" data-template="dropdown" data-default-time="${coach?.classTimePM}"
               data-minute-step="5">
    </div>
</div>



<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">下午课程数量</label>

    <div class="col-sm-10">
        <input type="text" name="coach.classNumberPM" class="form-control" placeholder="请输入下午课程数量"
               data-validate="required" value="${coach?.classNumberPM}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">单次时长(分钟)</label>

    <div class="col-sm-10">
        <input type="text" name="coach.singleTimeLength" class="form-control" placeholder="请输入单次时长"
               data-validate="required" value="${coach?.singleTimeLength}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-1">时间间隔(分钟)</label>

    <div class="col-sm-10">
        <input type="text" name="coach.timeInterval" class="form-control" placeholder="请输入时间间隔"
               data-validate="required" value="${coach?.timeInterval}">
    </div>
</div>

<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-2">备注</label>

    <div class="col-sm-10">
        <textarea class="form-control" cols="5" id="field-5" name="coach.remark" placeholder="请输入备注">${coach?.remark}</textarea>
    </div>
</div>


<div class="form-group-separator"></div>

<div class="form-group">
    <label class="col-sm-2 control-label" for="field-5"></label>

    <div class="col-sm-10">
        <button type="submit" class="btn btn-success">&nbsp;&nbsp;确定&nbsp;&nbsp;</button>
        <button type="reset" class="btn btn-white">&nbsp;&nbsp;重置&nbsp;&nbsp;</button>
    </div>

</div>